package com.neu.fenli2023623.service.impl;

import com.neu.fenli2023623.entity.FeeDetails;
import com.neu.fenli2023623.entity.Mzcz;
import com.neu.fenli2023623.entity.Mzcz;
import com.neu.fenli2023623.mapper.MzczMapper;
import com.neu.fenli2023623.service.MzczService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class MzczServiceImpl implements MzczService {
    @Autowired
    private MzczMapper mzczMapper;

    @Override
    public List<Map<String, Object>> selectAll() {
        return mzczMapper.selectAll();
    }
    public List<Map<String, Object>> selectByDateRange(String startDate, String endDate) {
        endDate =endDate+" 23:59:59";
        return mzczMapper.selectByDateRange(startDate, endDate);
    }

    @Override
    public List<Map<String, Object>> selectByPatient(String patientName, String cardNumber) {
        return mzczMapper.selectByPatient(patientName, cardNumber);
    }

    @Override
    public List<Map<String, Object>> selectByDateRangeOrPatient(String startDate, String endDate, String patientName, String cardNumber) {
        endDate =endDate+" 23:59:59";
        return mzczMapper.selectByDateRangeOrPatient(startDate, endDate,patientName, cardNumber);
    }


    @Override
    public int updateAddNote(Mzcz record) {
        return mzczMapper.updateAddNote(record);
    }
}
